home *** CD-ROM | disk | FTP | other *** search
- // $VER: support.c 1.0.0 (10.7.98)
-
- /*
- Name : support.c
- Purpose : support functions
- Author : Chris De Maeyer
- Compile : sc nolink opt support.c
- Copyright: sources (C)1997 Visionary Software, bin is
- released as FREEWARE.
-
- History:
- -------------------------------------------------------------------
- Date Description By
- -------------------------------------------------------------------
- Version 1.0
- -----------
- 30-08-97 Creation CDM
- 31-08-97 Added functions for FMirror CDM
- 10-07-98 Changed SrcPath, DstPath tags CDM
- 24-04-99 Added logging CDM
- -------------------------------------------------------------------
-
- */
- #include <stdio.h>
- #include "dirdiver.h"
-
- /*
- ** Functions
- */
- int put_LogOneMsg(char *logfile,char *mesg)
- {
- FILE *out;
- int i;
-
- if((out=fopen(logfile,"a"))==NULL)
- return(DD_OPENLOG);
-
- fputs(mesg,out);
-
- i=(ferror(out))?DD_WRITELOG:DD_OK;
-
- fclose(out);
- return(i);
- }
-
- int put_LogMsg(FILE *log,char *mesg)
- {
- int i;
-
- fputs(mesg,log);
-
- i=(ferror(log))?DD_WRITELOG:DD_OK;
-
- return(i);
- }
-
- FILE *open_Log(char *logfile)
- {
- FILE *out;
-
- return((out=fopen(logfile,"a")));
- }
-
- void close_Log(FILE *log)
- {
- if(log!=NULL)
- fclose(log);
- }
-
-
- /* The End */
-